﻿<!DOCTYPE html>
<html lang="zh">

<head resource>
    <include file="../inc/meta.inc" />
    <title>资金流水导出</title>
</head>

<body>
    <div id="app" v-cloak>


        <el-form :model="form" class="demo-form-inline" v-on:submit.native.prevent label-width="100px">
            <el-form-item label="时间范围">
                <el-date-picker v-model="selectDate" type="daterange" align="right" style="width: 305px;" unlink-panels
                    range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"
                    :default-time="['00:00:00', '23:59:59']">
                </el-date-picker>
            </el-form-item>
            <el-form-item label="来源">
                <el-radio-group v-model.number="form.from">
                    <el-radio-button :label="-1"> 所有 </el-radio-button>
                    <el-radio-button :label="3"> 在线支付 </el-radio-button>
                    <el-radio-button :label="1"> 管理员操作 </el-radio-button>
                    <el-radio-button :label="4"> 购买课程 </el-radio-button>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="操作">
                <el-radio-group v-model.number="form.type">
                    <el-radio-button :label="-1"> 所有 </el-radio-button>
                    <el-radio-button :label="1"> 支出 </el-radio-button>
                    <el-radio-button :label="2"> 充值 </el-radio-button>
                </el-radio-group>
            </el-form-item>
            <el-form-item>
                <el-button :type="loading ? 'info' : 'success'" v-on:click="btnOutput" class="el-icon-position"
                    :loading="loading" native-type="submit">
                    导出资金流水
                </el-button>
            </el-form-item>
            <template v-if="files.length>0">
                <el-divider></el-divider>
                <el-form-item label="文件下载">
                    <dl>
                        <dd v-for="(f,i) in files">
                            <div>{{i+1}}. <a :href="f.url" target="_blank" title="点击下载" :download="f.file">
                                    {{f.file}}</a>
                                {{f.size|size}}
                                <el-popconfirm title="确定删除这个文件吗？" @confirm="deleteFile(f.file)">
                                    <el-link type="danger" icon="el-icon-delete" v-loading="loading" slot="reference">删除
                                    </el-link>
                                </el-popconfirm>
                            </div>
                        </dd>
                    </dl>
                </el-form-item>
            </template>
        </el-form>

    </div>


</body>

</html>